export default (api) => {
  const current = ref(1)
  const size = ref(10)
  const total = ref(0)

  const changeSize = (val) => {
    current.value = 1
    size.value = val
    api()
  }

  const changePage = (val) => {
    current.value = val
    api()
  }

  return {
    current,
    size,
    changePage,
    changeSize,
    total
  }
}
